      SUBROUTINE ECHO
C
      IMPLICIT REAL*8 (A-H,O-Z)
      REAL*8 ISUBD,JARRAY,J2,J3,J4,J22,NSUBX
      INTEGER*4 ACNTRL,DDPLY
C
      COMMON/ANTENA/ A(10,3),ADOT(10,3),B(10,3),BDOT(10,3),DIN(10,3),
     .               DINDOT(10,3),DOUT(10,3),DOUTDT(10,3),ZBZ(3,10),
     .               NELMTS,NDAMPR,MODES(10)
C
      COMMON/CANTNA/ AA(10,3),AADOT(10,3),BB(10,3),BBDOT(10,3),
     .               DDIN(10,3),DDINDT(10,3),DDOUT(10,3),DDTOUT(10,3)
C
      COMMON/CCNVRT/ BDYMI(3,3),DPRMI(3,3),EMODLS(10),RTUBE(10),
     .               HTUBE(10),THERMC(10),TIPMS(10),C(10)
C
      COMMON/CFNALP/ SCO,CIZO(3,3),CIYO(3,3),DONA(3,10),DONB(3,10)
     .              ,CDAMP(3,10)
C
      COMMON/CNBODY/ J2,J3,J4,J22,ZJ20,ZMU,WWO,FLAT,AEARTH
C
      COMMON/CSOLAR/ SAO(10),SKA(9),SKB(9),SKOA(10,3),SKOB(10,3),
     .               STMK(10),SKAA(10,9),SKBB(10,9)
C
      COMMON/CSTVAL/ TSTART,ZL0(10),ZL1(10),ZL2(10),ZLA(10)
C
      COMMON/DATOUT/ IDATA,MLAST
C
      COMMON/DEPLOY/ DDPLY,MDPLY
C
      COMMON/DMMNT1/ ZKBM(6),FMAK(10),FMBK(10),ARTETA(3),CMTORK(3),
     .               ITORK,IBENDM,ITENSE,ITNS1
C
      COMMON/DEBUG1/IAFM1,IAFM2,IAFM3,IAFM4,IAFM5
C
      COMMON/DRGCOM/ ER(3),HUBCDA(3),HUBCP(3),UJD0,HUBF(3),HUBM(3),IDRAG
C
      COMMON/HAMOUT/ HAMILT,IHAMLT
C
      COMMON/HEAD22/ HEAD1(5),HEAD2(5),ILINE
C
      COMMON/IMAIN1/ IDATE,LSAVE,INOPT,IPLOT,NUMEQS,IPLTPE,IORB,ITAPE
C
      COMMON/IODPLY/ ISDPLY,IRAXIS,ISAXIS,NCROSS,NPRINT
C
      COMMON/IPOOL1/ IGRAV,IDAMP,IK,K1,ITIM,IAB,IAPS,IBB,IBPS,NK(10),
     .               LK(10),LLK(10)
C
      COMMON/ISHADE/ IPLANS,ISATSH,IWRTTF
C
      COMMON/JBTEST/ IBTEST
C
      COMMON/LIBDPR/ ZK1D,ZK2D,PHIS,PHILD,DPHILD,BETLD,GAMLD,
     .               ZMDO,ZMDBO,CNV,DECAY
C
      COMMON/MOMENT/ ACNTRL,IVISCS,IATTDE,IMGMTS,IWHEEL,NPULSE
C
      COMMON/CONSTS/PI,TWOPI,RADIAN
C
      COMMON/PLOTIT/ XMIN(11),XMAX(11),YMIN(11),YMAX(11),IFSCAL,
     .               KPLOTS(253)
C
      COMMON/PRESUR/ DTOO,POO
C
      COMMON/PWHEEL/ XMOMIN(3),DVMOM(3),VMOM(3)
C
      COMMON/RATTDE/ DTMXA,PXI,PXO,EIT,REFTIM,TMX1,TMX2,CMX,ISW
C
      COMMON/RMAIN1/ DELTAT,FACTOR,FREQ,TSTOP,DELMIT,
     .               UPBND(150),DNBND(150)
C
      COMMON/RMGNTC/ SMAGI(3),DPMAG(3),SFMAG,MAGFLD
C
      COMMON/RPOOL1/ RHOK(10),TIME,SA(3,3),FM1(3,3),ZLK(10),OMEG(3),
     .               ZLKP(10),ZLKDP(10),CMAT(3,3),GBAR(3,3),YBCM(3),
     .               ZBZK(3,10),FCM(3,3),DTO,PHID,PHI
C
      COMMON/RPOOL2/ PO,SD(3),DAN(3,10),DBN(3,10),CFMT(3,3),DIY1(3),
     .               SD1(3),DT1,P1,AERO,DTO1,YIZK(3),PO1
C
      COMMON/RPOOL3/ ZMS,YIZM(3,2)
C
      COMMON/RSUNCL/ WE,TVER,ECLPTC
C
      COMMON/RUNOUT/ LCPU
C
      COMMON/RVISCS/ NSUBX(3),YARRAY(3),RADTBE,VISCTY,RADRNG,DENSTY,
     .               JARRAY(3),SSUBY,OMEGL,ISUBD
C
      COMMON/SOLOUT/ FTAKIN(10,3),FTAKOT(10,3),FTBKIN(10,3),FTBKOT(10,3)
C
      COMMON/TJAN1/ T
C
      COMMON/TMSINR/ TIPINR(3,10)
C
      COMMON/VECTRS/ XSAT(3),XSATDT(3),AD(3)
C
      COMMON/XIN1  / PSI1,THET1,PHI1,ETTA,ZETTA,ITEST1
C
      COMMON/XIN2  / ALFAE,BETAE,GAMAE,OMBC(3),ITEST2
C
      COMMON/XIN3  / ALFAEK(10),BETAEK(10),GAMAEK(10),ETTAD,ZETTAD
C
      COMMON/ZSPINR/ DTZMA,PZDT,CMZO,ISPIN3,JSPIN
C   CODES ARE ADDED FOR THE ADDITIONAL ECHO OUTPUT
C   BY K.YONG FEB 1975
C
      COMMON/ITCNTL/IPULSE,ISPLSE
C
      COMMON/INUMP/ISPNP
C
      COMMON/IKPLER/IKPLR
C
      COMMON/HOUTPT/IHCALC,IHREF
C
      COMMON/THRUST/TVECTR(3),TLOCAT(3),TTIMES(4),TPARAM(4),REFANG
C
      COMMON/XKPLER/AS,E,F,EI,BW,W
C
C   ADD COMMON FOR ACCELERATION COMPUTATION
C
      COMMON/IACC/IACOMP,IHUBAC,ITIPAC
C
      COMMON/NUMACC/NUMHUB
C
      COMMON/ACCHUB/YHUB(3,6),HUBACC(3,6)
C
      COMMON/CECHON/CEI20(10),CEI21(10),CEI30(10),CEI31(10)
     1             ,CGJ0(10),CGJ1(10),TWI0(3,10),TWI1(3,10)
     2             ,TWID0(3,10),TWID1(3,10),MODEST(10)
C
      COMMON/INEWR/NKT(10),ICP,ICPS
C
      COMMON/ITW/ITWIST,ITWST1
C
      DIMENSION OMEB(3)
      DIMENSION HED0(5),HED1(5),HED2(5),HED3(5),HED4(5),HED5(5),HED6(5),
     .          HED7(5),HED8(5),HED9(5),HED10(5),HED11(5),HED12(5),
     .      HED13(5),HED14(5),
     .      HED15(5),HED16(5),HED17(5),A1(10,3),B1(10,3),
     .       AD1(10,3),BD1(10,3)
C
      DIMENSION HED22(5),HED23(5),HED24(5),HED27(5)
C
      DATA HED0 /'** ECHO ','PRINTOUT',' OF INPU','T PARAME','TERS ** '/
      DATA HED1 /'OPTION C','ONTROL W','ORDS    ','        ','        '/
      DATA HED2 /'TIME CON','TROL WOR','DS      ','        ','        '/
      DATA HED3 /'SATELLIT','E CORE P','ROPERTIE','S       ','        '/
      DATA HED4 /'ELEMENT ','PHYSICAL',' PROPERT','IES     ','        '/
      DATA HED5 /'ELEMENT ','GEOMETRY',' AND INI','TIAL CON','DITIONS '/
      DATA HED6 /'LIBRATIO','N DAMPER',' OPTION ','        ','        '/
      DATA HED7 /'SPINNING',' BODY AT','TITUDE A','ND BODY ','RATES   '/
      DATA HED8 /'GRAVITY ','GRADIENT',' ATTITUD','E AND BO','DY RATES'/
      DATA HED9 /'CONTROL ','WORDS FO','R DAMPER',', SPIN A','XIS     '/
      DATA HED10/'MOMENT, ','ATTITUDE',' CONTROL',', MOMENT','UM WHEEL'/
      DATA HED11/'AND MAGN','NETIC TO','RQUER OP','TIONS   ','        '/
      DATA HED12/'CONTROL ','WORDS FO','R SUN VE','CTOR, PU','NCH CARD'/
      DATA HED13/'AND PRIN','TOUT OPT','ION     ','        ','        '/
      DATA HED14/'INTEGRAT','ION CONT','ROL WORD','S       ','        '/
      DATA HED15/'CONTROL ','WORDS FO','R THERMA','L LAG, E','XTERNAL '/
      DATA HED16/'TORQUES,',' SHADOWI','NG, TENS','ION CALC','ULATIONS'/
      DATA HED17/' AND BEN','DING MOM','ENTS    ','        ','        '/
      DATA HED22/'CONTROL ','WORDS FO','R THRUST','ING OPTI','ON      '/
      DATA HED23/'CONTROL ','WORDS FO','R ANGULA','R MOMENT','UM OPT  '/
      DATA HED24/'CONTROL ','WORDS FO','R ORBIT ','INPUT OP','TION    '/
      DATA HED27/'CONTROL ','WORDS FO','R ACCELE','RATION O','PTION   '/
C
C
      ILINE=0
      IK=NDAMPR+NELMTS
C
      DO 10 I=1,5
      HEAD1(I)=HED0(I)
   10 HEAD2(I)=HED1(I)
C
      CALL IVAL('IGRAV   ',5,IGRAV,0,0,0)
      CALL IVAL('IDRAG   ',5,IDRAG,0,0,0)
      CALL IVAL('IHAMLT  ',6,IHAMLT,0,0,0)
      CALL IVAL('INOPT   ',5,INOPT,0,0,0)
      CALL IVAL('DDPLY   ',5,DDPLY,0,0,0)
      CALL IVAL('MDPLY   ',5,MDPLY,0,0,0)
      CALL IVAL('IDATA   ',5,IDATA,0,0,0)
      CALL IVAL('MLAST   ',5,MLAST,0,0,0)
      CALL IVAL('IBTEST  ',6,IBTEST,0,0,0)
      CALL IVAL('ISDPLY  ',6,ISDPLY,0,0,0)
C
      CALL HVAL(HED15)
      CALL HVAL(HED16)
      CALL HVAL(HED17)
      CALL IVAL('ITORK   ',5,ITORK,0,0,0)
      CALL IVAL('IPLANS  ',6,IPLANS,0,0,0)
      CALL IVAL('ISATSH  ',6,ISATSH,0,0,0)
      CALL IVAL('IWRTTF  ',6,IWRTTF,0,0,0)
      CALL IVAL('IBENDM  ',6,IBENDM,0,0,0)
      CALL IVAL('ITENSE  ',6,ITENSE,0,0,0)
      CALL HVAL(HED9)
      CALL HVAL(HED10)
      CALL HVAL(HED11)
      CALL IVAL('IDAMP   ',5,IDAMP,0,0,0)
      CALL IVAL('IVISCS  ',6,IVISCS,0,0,0)
      CALL IVAL('ISPIN3  ',6,ISPIN3,0,0,0)
      CALL IVAL('IATTDE  ',6,IATTDE,0,0,0)
      CALL IVAL('IWHEEL  ',6,IWHEEL,0,0,0)
      CALL IVAL('IMGMTS  ',6,IMGMTS,0,0,0)
C   ADD EXTRA CONTROL WORDS
      CALL HVAL(HED22)
      CALL IVAL('IPULSE  ',6,IPULSE,0,0,0)
      CALL IVAL('ISPLSE  ',6,ISPLSE,0,0,0)
      CALL IVAL('ISPNP   ',5,ISPNP,0,0,0)
      CALL HVAL(HED23)
      CALL IVAL('IHCALC  ',6,IHCALC,0,0,0)
      CALL IVAL('IHREF   ',5,IHREF,0,0,0)
      CALL HVAL(HED27)
      CALL IVAL('IACOMP  ',6,IACOMP,0,0,0)
      CALL IVAL('IHUBAC  ',6,IHUBAC,0,0,0)
      CALL IVAL('ITIPAC  ',6,ITIPAC,0,0,0)
      CALL HVAL(HED24)
      CALL IVAL('IKPLR   ',5,IKPLR,0,0,0)
C
      CALL HVAL(HED12)
      CALL HVAL(HED13)
      CALL IVAL('IAFM1   ',5,IAFM1,0,0,0)
      CALL IVAL('IAFM2   ',5,IAFM2,0,0,0)
      CALL IVAL('IAFM3   ',5,IAFM3,0,0,0)
C
      CALL HVAL(HED2)
      CALL IVAL('IDATE   ',5,IDATE,0,0,0)
      IF(IDATA.EQ.0) GO TO 15
      CALL FVAL('TIME    ',4,TIME,0,0,0)
      GO TO 16
 15   CALL FVAL('TIME    ',4,T,0,0,0)
 16   CONTINUE
      CALL FVAL('TSTOP   ',5,TSTOP,0,0,0)
      CALL FVAL('FREQ    ',4,FREQ,0,0,0)
      CALL IVAL('LCPU    ',4,LCPU,0,0,0)
C
      CALL HVAL(HED14)
      CALL FVAL('DELTAT  ',6,DELTAT,0,0,0)
      CALL FVAL('DELMIT  ',6,DELMIT,0,0,0)
      CALL FVAL('FACTOR  ',6,FACTOR,0,0,0)
      CALL H1(IVISCS,IATTDE,IWHEEL,IMGMTS)
C
      CALL HVAL(HED3)
      CALL FVAL('BDYMI   ',5,BDYMI,3,3,2)
      CALL FVAL('HUBCDA  ',6,HUBCDA,3,0,1)
      CALL FVAL('HUBCP   ',5,HUBCP,3,0,1)
      CALL FVAL('ZMS     ',3,ZMS,0,0,0)
C
      CALL HVAL(HED4)
      CALL FVAL('EMODLS  ',6,EMODLS,IK,0,1)
      CALL FVAL('RTUBE   ',5,RTUBE,IK,0,1)
      CALL FVAL('HTUBE   ',5,HTUBE,IK,0,1)
      IF(IDATA.EQ.0) CALL FVAL('EI2     ',3,CEI20,IK,0,1)
      IF(IDATA.EQ.1) CALL FVAL('EI2     ',3,CEI21,IK,0,1)
      IF(IDATA.EQ.0) CALL FVAL('EI3     ',3,CEI30,IK,0,1)
      IF(IDATA.EQ.1) CALL FVAL('EI3     ',3,CEI31,IK,0,1)
      IF(ITWIST.EQ.0) GO TO 17
      IF(IDATA.EQ.0) CALL FVAL('GJ      ',2,CGJ0,IK,0,1)
      IF(IDATA.EQ.1) CALL FVAL('GJ      ',2,CGJ1,IK,0,1)
   17 CONTINUE
      CALL FVAL('THERMC  ',6,THERMC,IK,0,1)
      CALL FVAL('TIPMS   ',5,TIPMS,IK,0,1)
C
      CALL FVAL('TIPI    ',4,TIPINR,3,IK,2)
      CALL FVAL('SAO     ',3,SAO,IK,0,1)
      CALL FVAL('STMK    ',4,STMK,IK,0,1)
      CALL FVAL('RHOK    ',4,RHOK,IK,0,1)
      CALL FVAL('POO     ',3,POO,0,0,0)
      CALL FVAL('DTOO    ',4,DTOO,0,0,0)
      CALL FVAL('AERO    ',4,AERO,0,0,0)
C
      CALL HVAL(HED5)
      CALL IVAL('NELMTS  ',6,NELMTS,0,0,0)
      CALL IVAL('MODES-B ',7,MODES,IK,0,1)
      IF(ITWIST.EQ.0) GO TO 18
      IF(IDATA.EQ.0) CALL IVAL('MODES-T ',7,MODEST,IK,0,1)
      IF(IDATA.EQ.1) CALL IVAL('MODES-T ',7,NKT,IK,0,1)
   18 CONTINUE
      CALL FVAL('ZL0     ',3,ZL0,IK,0,1)
      CALL FVAL('ZL1     ',3,ZL1,IK,0,1)
      CALL FVAL('ZLA     ',3,ZLA,IK,0,1)
      CALL FVAL('ZBZ     ',3,ZBZ,3,IK,2)
      CALL FVAL('ALFAEK  ',6,ALFAEK,IK,0,1)
      CALL FVAL('BETAEK  ',6,BETAEK,IK,0,1)
      CALL FVAL('GAMAEK  ',6,GAMAEK,IK,0,1)
C
      IF (IDATA .EQ. 0)  GO TO 116
      CALL CHECK(A1,AA,NELMTS)
      CALL CHECK(AD1,AADOT,NELMTS)
      CALL CHECK(B1,BB,NELMTS)
      CALL CHECK(BD1,BBDOT,NELMTS)
      GO TO 117
C
  116 CALL CHECK(A1,A,NELMTS)
      CALL CHECK(AD1,ADOT,NELMTS)
      CALL CHECK(B1,B,NELMTS)
      CALL CHECK(BD1,BDOT,NELMTS)
C
  117 CALL ELOUT(A1,B1,AD1,BD1,NELMTS)
      IF(ITWIST.EQ.0) GO TO 22
      IF(IDATA.EQ.1) GO TO 21
      CALL FVAL('TWIST   ',5,TWI0,3,IK,2)
      CALL FVAL('TWISTD  ',6,TWID0,3,IK,2)
      GO TO 22
   21 CONTINUE
      CALL FVAL('TWIST   ',5,TWI1,3,IK,2)
      CALL FVAL('TWISTD  ',6,TWID1,3,IK,2)
   22 CONTINUE
      CALL IVAL('LK      ',2,LK,IK,0,1)
      CALL IVAL('LLK     ',3,LLK,IK,0,1)
      CALL FVAL('SKOA    ',4,SKOA,NELMTS,3,2)
      CALL FVAL('SKOB    ',4,SKOB,NELMTS,3,2)
      CALL FVAL('CDAMP   ',5,CDAMP,3,IK,2)
C
      IF(IDAMP.EQ.0) GO TO 20
C
      CALL HVAL(HED6)
      CALL IVAL('IDAMP   ',5,IDAMP,0,0,0)
      CALL IVAL('NDAMPR  ',6,NDAMPR,0,0,0)
      CALL FVAL('YIZM    ',4,YIZM,3,2,2)
      CALL FVAL('PHIS    ',4,PHIS,0,0,0)
      CALL FVAL('PHILD   ',5,PHILD,0,0,0)
      CALL FVAL('DPHILD  ',6,DPHILD,0,0,0)
      CALL FVAL('BETLD   ',5,BETLD,0,0,0)
      CALL FVAL('GAMLD   ',5,GAMLD,0,0,0)
C
      IF (IDATA .EQ. 0)  GO TO 118
      CALL CHECK(A1,DDIN,NDAMPR)
      CALL CHECK(AD1,DDINDT,NDAMPR)
      CALL CHECK(B1,DDOUT,NDAMPR)
      CALL CHECK(BD1,DDTOUT,NDAMPR)
C
      GO TO 119
  118 CALL CHECK(A1,DIN,NDAMPR)
      CALL CHECK(AD1,DINDOT,NDAMPR)
      CALL CHECK(B1,DOUT,NDAMPR)
      CALL CHECK(BD1,DOUTDT,NDAMPR)
  119 CALL DROUT(A1,B1,AD1,BD1,NDAMPR)
      CALL FVAL('ZK1D    ',4,ZK1D,0,0,0)
      CALL FVAL('ZK2D    ',4,ZK2D,0,0,0)
      CALL FVAL('ZMDO    ',4,ZMDO,0,0,0)
      CALL FVAL('ZMDBO   ',5,ZMDBO,0,0,0)
      CALL FVAL('DECAY   ',5,DECAY,0,0,0)
      CALL FVAL('DPRMI   ',5,DPRMI,3,3,2)
      CALL FVAL('CNV     ',3,CNV,0,0,0)
C
   20 IF(INOPT.EQ.2) GO TO 30
C
      CALL HVAL(HED7)
      DO 222 I=1,3
      OMEB(I)=OMEG(I)
      IF(IDATA.EQ.1)    OMEB(I)=OMEG(I)/RADIAN
 222  CONTINUE
      CALL FVAL('PSI1    ',4,PSI1,0,0,0)
      CALL FVAL('THET1   ',5,THET1,0,0,0)
      CALL FVAL('PHI1    ',4,PHI1,0,0,0)
      CALL FVAL('OMEG    ',4,OMEB,3,0,1)
      CALL FVAL('ETTA    ',4,ETTA,0,0,0)
      CALL FVAL('ZETTA   ',5,ZETTA,0,0,0)
      GO TO 40
C
   30 CALL HVAL(HED8)
      CALL FVAL('ALFAE   ',5,ALFAE,0,0,0)
      CALL FVAL('BETAE   ',5,BETAE,0,0,0)
      CALL FVAL('GAMAE   ',5,GAMAE,0,0,0)
      CALL FVAL('OMBC    ',4,OMBC,3,0,1)
 40   CONTINUE
      CALL ECHOA
C
      RETURN
      END
